core: Also chown() after unpacking objects
authorColin Walters <walters@verbum.org>
Fri, 18 Nov 2011 23:50:29 +0000 (18:50 -0500)
committerColin Walters <walters@verbum.org>
Fri, 18 Nov 2011 23:50:29 +0000 (18:50 -0500)
src/libostree/ostree-core.c

index ebf4737ebcbeccde1012b064e3f9ffb66f9a2817..c7a1cb1343d05a4edf4234b9c9aca5f7bd3f454c 100644 (file)
@@ -871,6 +871,12 @@ unpack_file (GFile        *file,
       goto out;
     }
 
+  if (lchown (dest_path, uid, gid) < 0)
+    {
+      ot_util_set_error_from_errno (error, errno);
+      goto out;
+    }
+
   if (!S_ISLNK (mode))
     {
       if (chmod (dest_path, mode) < 0)